Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exception in g_to_c mapping #765

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

b0d0nne11
Copy link
Contributor

Fixes #764.

@b0d0nne11 b0d0nne11 requested a review from a team as a code owner March 4, 2025 21:30
Copy link
Member

@reece reece left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Brendan! This looks good with some very small change requests.

conftest.py has most of the fixtures that you define in test_764.py. Would you please use those instead? I think it should be sufficient to remove the hdp and am37 fixtures, and renaming hp to parser.

You'll need to define your own vm for now. Although, for bonus points, you could move it to conftest.

You might very well have modeled this on existing tests, but I've recently uncovered challenges with the current layout. See #760 and #761 for details.

The path forward is to consolidate fixtures in conftest.py.

Thanks!

@@ -268,6 +268,7 @@ def g_to_c(self, var_g, tx_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln
edit_c.type == "ins"
and pos_c.start.offset == 0
and pos_c.end.offset == 0
and pos_c.start.datum == pos_c.end.datum
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@b0d0nne11
Copy link
Contributor Author

Thanks @reece. Using the conftest.py fixtures was much easier.

@reece reece merged commit 1f01005 into biocommons:main Mar 5, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix g to c mappings where the end position is after the coding region
2 participants